package soap.latherqq.ui;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JFrame;

import soap.latherqq.ui.panel.main.TalkPanel;
import soap.latherqq.ui.panel.main.UserInfoPanel;

import com.alee.laf.WebLookAndFeel;
import com.alee.laf.panel.WebPanel;
import com.alee.laf.rootpane.WebDialog;
import com.alee.laf.rootpane.WebFrame;
import com.alee.laf.rootpane.WebRootPaneStyle;

public class MainFrame extends WebFrame {
	private TalkPanel talkPanel;
	private UserInfoPanel userInfoPanel;
	public MainFrame() {
		inGui();
	}
	private void inGui(){
		this.setTitle("主界面");
		this.setSize(700, 500);
		this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		this.setLocationRelativeTo(null);
		this.setMinimumSize(new Dimension(700, 500));
		this.getContentPane().setLayout(new BorderLayout());
		
		talkPanel=new TalkPanel();
		this.getContentPane().add(talkPanel,BorderLayout.CENTER);
		
		userInfoPanel=new UserInfoPanel();
		
		WebPanel mainPanel=new WebPanel(new BorderLayout());
		mainPanel.add(userInfoPanel,BorderLayout.NORTH);
		
		this.getContentPane().add(mainPanel,BorderLayout.WEST);
	}

	public static void main(String[] args) {
		WebRootPaneStyle.shadeWidth = 0;
		WebRootPaneStyle.round = 0;
		WebLookAndFeel.install();
		WebFrame.setDefaultLookAndFeelDecorated(true);
		WebDialog.setDefaultLookAndFeelDecorated(true);
		new MainFrame().setVisible(true);
	}
}
